import { createRouter, createWebHistory } from "vue-router";
// @ts-ignore
import index from '../pages/index.vue'
import app1 from "../pages/sonApp/app1.vue"
import app2 from "../pages/sonApp/app2.vue"

const router = createRouter({
    //模式：1、hash模式(createWebHashHistory()  )  2、history模式(createWebHistory()  )
    history: createWebHistory(),
    //路由表
    routes: [
        {
            path: "/",
            redirect:'/index'
        },
        {
            path: "/index",
            name: "home",
            component: index
        },
        {
            path: "/app1",
            name: "app1",
            component:app1
        },
        {
            path: "/app2",
            name: "app2",
            component: app2
        },
    ]
})

export default router